package org.dromara.data.dnnyun.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.dromara.common.core.domain.R;
import org.dromara.common.encrypt.annotation.ApiEncrypt;
import org.dromara.data.dnnyun.service.IDnnyunDataService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 东云数据同步
 *
 * @author wdm
 */
@Slf4j
@SaIgnore
@RestController
@RequestMapping("/data/dnnyun")
public class DnnyunController {

    @Resource
    private IDnnyunDataService dnnyunDataService;

    /**
     * 同步省市区街道信息
     * @return
    */
    @GetMapping("/provinceList")
    public R provinceList() {
        dnnyunDataService.syncProvince();
        return R.ok();
    }
    /**
     * 同步省市区街道信息
     * @return
     */
    @GetMapping("/storeList")
    public R storeList() {
        dnnyunDataService.syncStore();
        return R.ok();
    }
}
